package web;

import java.io.IOException;
import java.util.*;

import javax.servlet.*;
import javax.servlet.http.*;

import dao.*;
import entity.*;

public class LVADetailsServlet extends HttpServlet {
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {

		long lvaDbID = Long.parseLong(req.getParameter("lvaDbID"));
		Lva lva = new LvaDAO().load(lvaDbID);
		req.setAttribute("lva", lva);

		req.setAttribute("professor", lva.getProf());

		req.setAttribute("pruefungEntries", lva.getPruefungen());

		req.getRequestDispatcher("LVADetails.jsp").forward(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		super.doPost(req, resp);

	}
}
